Repository navigation
Pin how a failure's cause and an absolute URL are reduced - #41
Merged
Merged
Conversation
A debug line names a failure's cause only when it is an Error, and only the first one: a string cause is left out, and a cause's own cause is not followed. pagePath() keeps nothing but the path of an absolute URL -- no credentials, host or port -- whatever the case of its scheme, and for schemes other than http(s) too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Self-review rubric (one pass, anchored on CI run 43147400772):
One judgment call was made. The Local anchor: UNVERIFIED (Node is not installed in this session). CI on the exact head SHA served as the anchor instead. This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage B (unit-test expansion) cycle: two existing behaviors that no test pinned are now characterized. No production code is changed.
describe()cause handling —names only an Error cause, one level deep, in the debug line. A failure whosecauseis not anError(a string) gets no cause text, and a cause's owncauseis not followed:Error: fetch failed (outer), never(inner).pagePath()on absolute URLs —keeps no credentials, host or port from an absolute URL, whatever the scheme's case.https://user:[email protected]:8443/account/?token=xgives/account; an upper-caseHTTPS://scheme is still recognized while the path keeps its case; anftp://URL is reduced the same way. This guards the README's "the path, and only the path" privacy claim against credentials or a host leaking into apagetag.Test plan
testjob green on the PR head (npm ci,npm run typecheck,npm teston Node 22), with the executed-test count two higher than onmainNotes
tests/trace-client.test.ts.User-Agentheader and theenabledopt-out semantics). They are left open for that reason.CHANGELOG.md: no entry, since only tests changed and nothing a consumer vendors is affected.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code